<!DOCTYPE html >
<html>
<head>
<meta name="Generator" content="TPshop v1.1" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>我的名片</title>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<link rel="stylesheet" href="__ROOT__ /AI_radar/css/footer.css">
<link rel="stylesheet" href="__ROOT__ /AI_radar/css/font_my/iconfont.css">
<script type="text/javascript" src="__ROOT__ /AI_radar/js/token.js"></script>
<style type="text/css">
	body,html{
		width: 100%;
		height: 100%;
		margin: 0;
		padding: 0;
		overflow-x: hidden;
		color:#555555;
	}
	/*.oneself{
		width: calc(100% - 20px);
		padding: 0 10px;
	}*/

	.btn{
		width: 50%;
		line-height: 36px;
		border:1px solid #4f81d4;
		color: #4f81d4;
		text-align: center;
		border-radius: 28px 28px 28px 28px;
		margin: 20px 25%;
	}
	.oneselfTop{
		width: calc(100% - 20px);
		padding: 0 10px;
		border-bottom: 10px solid #eee;
	}
	.oneselfTZ{
		width: 100%;
		/*height: 250px;*/
		border:1px solid #ccc;
		/*border-radius: 5px;*/
		box-shadow: 0 0 5px #000000;
		margin-bottom: 10px;

	}
	.oneselfImg{
		width: 100%;
	}
	.oneselfImg img{
		width: 100%;
	}
	.oneselfTB{
		width: 100%;
		height: 60px;
		display: flex;
	}
	.oneselfTBL{
		width: calc(100% - 70px);
		text-indent: 10px;
	}
	.oneselfTBR{
		width: 70px;
	}
	.oneselfTBLT{
		line-height: 30px;
	}
	.oneselfTname{
		font-size: 16px;
		font-weight: bold;
	}
	.oneselfTzw{
		font-size: 13px;
		color: #666666;
	}
	.oneselfTBLB{
		font-size: 13px;
	}
	.oneselfTBR img{
		width: 40px;
		height: 40px;
		margin-top: 10px;
	}
	.oneselfCenter{
		width: 100%;
		padding: 10px 0;
		border-bottom: 10px solid #eee;
	}
	.oneselfP{
		font-size: 17px;
		font-weight: bold;
		text-indent: 10px;
	}
	.oneselfCOne{
		width: calc(100% - 20px);
		padding: 10px 10px;
		display: flex;
		border:1px solid #eaeaea;
	}
	.oneselfCOneL{
		width: 60px;
		font-weight: bold;
		line-height: 30px;
	}
	.oneselfCOneR{
		width: calc(100% - 60px);
		line-height: 30px;
	}
	.gsImg{
		display: none;
	}




</style>

</head>
<body>
	{include file="public/wx_share" /}
	<div class="oneself">
		<div class="oneselfTop">
			<div class="oneselfTZ">
				<div class="oneselfImg">
					<img src="__ROOT__ /AI_radar/image/my/styleMy.jpg" class="headImg" alt="">
				</div>
				<div class="oneselfTB">
					<div class="oneselfTBL">
						<div class="oneselfTBLT"><span class="oneselfTname"></span><span class="oneselfTzw"></span></div>
						<div class="oneselfTBLB"></div>
					</div>
					<div class="oneselfTBR">
						<img src="__ROOT__ /AI_radar/image/my/logo.png" class="gsImg" alt="">
					</div>
				</div>
			</div>
		</div>
		<div class="oneselfCenter">
			<p class="oneselfP">个人信息</p>
			<div class="oneselfCZ">
				<!-- <div class="oneselfCOne">
					<div class="oneselfCOneL">手机</div>
					<div class="oneselfCOneR">18666666666</div>
				</div>
				<div class='oneselfCOne'><div class='oneselfCOneL'>手机</div><div class='oneselfCOneR'>18666666666</div></div>
				<div class="oneselfCOne">
					<div class="oneselfCOneL">手机</div>
					<div class="oneselfCOneR">18666666666</div>
				</div> -->
			</div>
		</div>
		<div class="oneselfBottom">
			<div class="btn messageClick">编辑名片</div>
		</div>

	</div>

<script src='__ROOT__ /AI_radar/js/jquery.js'></script>
<script type="text/javascript">
	$(".messageClick").attr("onclick","window.location.href='" + window.urls.url + "/my/message?corpid=" + localStorage.getItem("CRM_corpId") + "'")


	$.ajax({
	      url:window.urls.url + "/my/oneself/info",
	      type:"POST",
	      contentType: "application/json",
	      dataType:"json",
	      data:JSON.stringify({
	        token:window.tokens.token_boss,
	      }),
	      success:function(res){
	        console.log(res)
	        console.log(res.data)
	        if(res.data){
	        	if(res.data.userimg){
	        		document.querySelector(".headImg").src = res.data.userimg.url
	        	}
	        	if(res.data.name){
	        		$(".oneselfTname").html(res.data.name)
	        	}
	        	if(res.data.position){
	        		$(".oneselfTzw").html(res.data.position)
	        	}
	        	if(res.data.thirdapp){
	        		if(res.data.thirdapp.head_img){
	        			$(".gsImg").css("display","block")
	        			document.querySelector(".gsImg").src = res.data.thirdapp.head_img
	        		}
	        	}
	        	if(res.data.card){
	        		if(res.data.card.phone){
	        			$(".oneselfTBLB").html(res.data.card.phone);
	        			newDiv("手机",res.data.card.phone)
	        		}
	        		if(res.data.card.email){
	        			newDiv("班型",res.data.card.email)
	        		}
	        		if(res.data.card.wechat_num){
	        			newDiv("微信",res.data.card.wechat_num)
	        		}
	        		if(res.data.card.company){
	        			newDiv("公司",res.data.card.company)
	        		}
	        		if(res.data.card.address){
	        			newDiv("地址",res.data.card.address)
	        		}
	        	}

	        }
	      },
	      error:function(res){
	        console.log(res)
	      }
  	})
  	function newDiv(name,num){
  		var div = $("<div class='oneselfCOne'><div class='oneselfCOneL'>"+name+"</div><div class='oneselfCOneR'>"+num+"</div></div>");
  		$(div).appendTo(".oneselfCZ")
  	}
	// console.log($)

</script>
</body>
</html>